package com.mccken.demo.whitelist.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: mccken-collect
 * @description:
 * @author: mccken
 * @create: 2022-07-09 17:40
 **/
@Configuration
@ConditionalOnClass(WhiteListProperties .class)
@EnableConfigurationProperties(WhiteListProperties.class)
public class WhiteListConfiguration {
	
	@Bean("whiteListConfig")
	@ConditionalOnMissingBean
	public String whiteListConfig(WhiteListProperties whiteListProperties) {
		return whiteListProperties.getUsers();
	}
	
	
}
